const getRequestParams = function (url) {
    var urlStr = url ? url : location.href;

    var myRequest = new Object();
    if (urlStr.indexOf("?") != -1) {
        var tempStr = urlStr.substr(urlStr.indexOf("?") + 1);
        var strArr = tempStr.split("&");
        for (var i = 0; i < strArr.length; i++) {
            myRequest[strArr[i].split("=")[0]] = strArr[i].split("=")[1];
        }
    }
    return myRequest;
}

export default getRequestParams